{% extends "OspHomeBundle::layout.html.twig" %}

{% block OspHome_body %}
	<h3>Vos commandes</h3>
	<hr>

	<ul class="nav nav-pills nav-stacked">
		<table class="table table-striped">
			<thead>
				<tr>
					<th>Produits</th>
					<th>Statut</th>
					<th>Frais de port</th>
					<th>Montant</th>
				</tr>
			</thead>
			
			<tbody>
				{% for order in orders %}
				<tr>
					<td> {{ order.getProducts() | truncate(100, true, '...') }} </td>
					<td>{{order.status}}</td>
					<td>{{order.getFraisPort() ~ ' €'}}</td>
					<td>{{order.getPrix() ~ ' €'}}</td>
				</tr>	
				{% endfor %}
			</tbody>
		</table>

		{%if error%}
		{{error}}
		{%endif%}

{% endblock %}